9-palindrome-number.py
problem: ---
problem:

Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same 
backward as forward.

Example 1:
Input: 121
Output: true

Example 2:
Input: -121
Output: false
Explanation: From left to right, it reads -121. From right to left, it becomes 121-. 
Therefore it is not a palindrome.

Example 3:
Input: 10
Output: false
Explanation: Reads 01 from right to left. Therefore it is not a palindrome.
---

-----------------------------------------------------------------------
bug_fixes: ---
bug_fixes:
Replace <= with < on line 3.
Replace `temp /=10` with `temp //=10` on line 8.
---

-----------------------------------------------------------------------
bug_desc: ---
bug_desc:
On line 3, the condition returns False for any non-positive value. In doing so, 0 is not considered as a palindrome, which is incorrect. Instead of the <= operator, the < operator should be used.
On line 8, a float division occurs between temp and 10. This is incorrect, and should be an integer division instead. Use `//` instead of `/`.
---

-----------------------------------------------------------------------
line_no: ---
line_no:
3
---

-----------------------------------------------------------------------
buggy_code: ---
buggy_code:
1. class Solution:
2.     def isPalindrome(self, x):
3.         if x <= 0:
4.             return False
5.         temp,rev = x, 0
6.         while temp > 0:
7.             rev = rev * 10 + temp%10
8.             temp /=10
9.         return True if x == rev else False
10. 
---

-----------------------------------------------------------------------
correct_code: ---
correct_code:
1. class Solution:
2.     def isPalindrome(self, x):
3.         if x < 0:
4.             return False
5.         temp,rev = x, 0
6.         while temp > 0:
7.             rev = rev * 10 + temp%10
8.             temp //=10
9.         return True if x == rev else False
---

-----------------------------------------------------------------------
